<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>提现账户管理</title>
    <!-- Le styles -->
    <link href="/common/js/bootstrap-3.0.0/css/bootstrap-united.min.css" rel="stylesheet">
    <style type="text/css">
        body {
            padding: 10px 0;
        }
    </style>
</head>
<body>
<div class="container">
    <#--<form id="form" method="post" class="well form-horizontal">
        <fieldset>
            <legend>通知管理</legend>
            <div class="form-group">
                <div class="col-md-4">
                    <label class="col-md-4 control-label" for="username">登录名</label>

                    <div class="col-md-8">
                        <input id="username" name="username" type="text" class="form-control"/>
                    </div>
                </div>

                <div class="col-md-4">
                    <label class="col-md-4 control-label" for="datetime">日期</label>

                    <div class="col-md-8">
                        <input id="datetime" name="datetime" class="form-control Wdate"
                               onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
                    </div>
                </div>

                <div class="col-md-4">
                    <label class="col-md-4 control-label" for="logtype">操作行为</label>

                    <div class="col-md-8">
                        <select id="logtype" name="logtype" class="form-control">
                            <option value=""></option>
                            <option value="用户登陆">用户登陆</option>
                            <option value="登陆失败">登陆失败</option>
                            <option value="用户注销">用户注销</option>
                            <option value="新增资源">新增资源</option>
                            <option value="修改资源">修改资源</option>
                            <option value="删除资源">删除资源</option>
                            <option value="添加角色">添加角色</option>
                            <option value="删除角色">删除角色</option>
                            <option value="编辑角色权限">编辑角色权限</option>
                            <option value="添加用户">添加用户</option>
                            <option value="删除用户">删除用户</option>
                            <option value="修改用户">修改用户</option>
                            <option value="修改密码">修改密码</option>
                            <option value="修改规则">修改规则</option>
                            <option value="删除规则">删除规则</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-12 text-right">
                    <a style="width: 80px;" href="/msg/addPushMsgView" class="btn btn-success">新建推送</a>
                    <button type="button" id="searchBtn" style="width: 80px;" class="btn btn-primary">查询</button>
                </div>
            </div>
        </fieldset>
    </form>-->

    <div class="col-md-12 text-right" style="margin:10px 0;">
        <a style="width: 80px;" href="/account/addWithdrawAccountView" class="btn btn-success">新建</a>
    </div>

        <table id="resultTable" class="table table-bordered table-hover">
            <thead>
            <tr>
                <th>编号</th>
                <th>用户编号</th>
                <th>开户名</th>
                <th>支付方式</th>
                <th>开户行</th>
                <th>账号</th>
                <th>状态</th>
                <th>描述</th>
                <th>详情</th>
            </tr>
            </thead>
            <tbody>
            <script type="text/html">
                <tr>
                    <td>{{id}}</td>
                    <td>{{userId}}</td>
                    <td>{{name}}</td>
                    <td>{{bankType?renderBankType}}</td>
                    <td>{{openFrom}}</td>
                    <td>{{accountNum}}</td>
                    <td>{{status?renderStatus}}</td>
                    <td>{{descn!''}}</td>
                    <td><a style="width: 80px;" href="/account/editWithdrawAccountView?id={{id}}" class="btn btn-success">编辑</a></td>
                </tr>
            </script>
            </tbody>
        </table>
</div>
<script type="text/javascript" src="/common/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/common/js/bootstrap-table.20130913.js"></script>
<script type="text/javascript" src="/common/js/dateformat.js"></script>
<script type="text/javascript" src="/common/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
    $(function () {
        var param = $("#form").serialize();
        var s = $("#resultTable").bsTable({
            url: '/account/getWithdrawAccountList.json',
            ajaxType: "POST",  //ajax 提交方式 post 或者 get
            pageNo: 1,
            pageNoAlias: 'page',
            pageSize: 10,
            pageSizeAlias: 'pageSize',
            pagingAlign: "right",
            param: param,
            countRoot: "total",
            dataRoot: "list"
        });

        $("#searchBtn").on('click', function () {
            var param = $("#form").serialize();
            s.reload(param);
        });

//        window.onresize = function () {
//            window.top.autoIFrame();
//        }
    });

    function renderImg(imgUrl) {
        return "<img src=\"http://img.boyitongcheng.com/"+imgUrl+"\" width=\"60px\" height=\"40px\"/>";
    }

    function renderStatus(status) {
        if (status == -1) {
            return "停用";
        } else {
            return "在用";
        }
    }

    function renderBankType(bankType) {
        if (bankType == 1) {
            return "支付宝";
        } else if(bankType == 2) {
            return "建设银行";
        } else if(bankType == 3) {
            return "中国银行";
        } else if(bankType == 4) {
            return "交通银行";
        } else if(bankType == 5) {
            return "工商银行";
        } else if(bankType == 6) {
            return "中信银行";
        } else if(bankType == 7) {
            return "兴业银行";
        } else if(bankType == 8) {
            return "农业银行";
        } else if(bankType == 9) {
            return "招商银行";
        } else if(bankType == 10) {
            return "民生银行";
        } else if(bankType == 11) {
            return "光大银行";
        }else{
            return "";
        }
    }

</script>
</body>
</html>